package com.linchong.jvm.memory;

import lombok.extern.slf4j.Slf4j;

/**
 * @author linchong
 * @version 1.0
 * @Date: 2020-11-16 20:29
 * @Description: StackParams$栈相关的参数
 */
@Slf4j
public class StackParams {

	private int num=0;

	private int callMe(int a,int b){
		num++;
		return callMe(a+num,b);
	}

	public static void main(String[] args) {
		StackParams instance = new StackParams();
		try {
			instance.callMe(1,2);
		}catch (Throwable err){
			log.info("递归调用了【{}】次",instance.num);
			err.printStackTrace();
		}
	}
}
